glglyphcache: Fix dropping caches unnecessarily
authorTimm Bäder <mail@baedert.org>
Sun, 10 Feb 2019 09:07:24 +0000 (10:07 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 10 Feb 2019 09:31:27 +0000 (10:31 +0100)
commita872c41f791a62c99f0b2b59b34f303e270a7ba2
tree84743df26908c0e890a9555b6cc4b16e96370c53
parentea554580c7c099081e577a97e793ac6f16c014b6
glglyphcache: Fix dropping caches unnecessarily

The first set of glyphs is created with a timestamp of 1. Later we
subtract the glyph timestamp from the cache timestamp, meaning we end up
with numbers ending in 9, e.g. 59. Now unfortunately !(60 <= 59), so we
do not end up incrasing the old_pixels count of the cache. Later we then
call lookup() and DEcrease the old_pixels count, which makes the
unsigned int wrap and cause a huge old_pixels value, which causes us to
drop the cache.
gsk/gl/gskglglyphcache.c